package de.hundezimmer.beans;

import java.io.Serializable;
import java.sql.Date;

public class Customer implements Comparable<Customer>, Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -8749514709226335163L;
	private int id = 0;
	private String vorname, name;
	private Date create_time;
	private String email;

	public Customer(int id, String email, String vorname, String name, Date date) {
		this.id = id;
		this.vorname = vorname;
		this.name = name;
		this.setEmail(email);
		this.setCreate_time(date);
	}

	@Override
	public int compareTo(Customer o) {
		return o.getId() == this.id ? 0 : 1;
	}

	public Date getCreate_time() {
		return create_time;
	}

	public String getEmail() {
		return email;
	}

	public int getId() {
		return id;
	}

	public String getName() {
		return name;
	}

	public String getVname() {
		return vorname;
	}

	public void setCreate_time(Date date) {
		this.create_time = date;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public void setId(int id) {
		this.id = id;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setVname(String vname) {
		this.vorname = vname;
	}

	@Override
	public String toString() {

		return id + ", " + vorname + ", " + name;
	}
}
